            fr=(((double)((senr>mid_r)?red_agfa:red_agfa_c)/100-1)*(double)(senr-mid_r)/1000+(double)red_const/1000)*1000;
